from utils.connect import mysql
import yaml
import os


class APIClient:
    def __init__(self):
        self.sql=self.mysql_connect()
        # self.config = self._load_config()
        # self.base_url = self.config['base_url']

    # def _load_config(self):
    #     # 使用相对路径安全访问
    #     current_dir = os.path.dirname(os.path.abspath(__file__))
    #     config_path = os.path.join(current_dir, '../config/config.yaml')
    #     with open(config_path) as f:
    #         return yaml.safe_load(f)

    def mysql_connect(self):
        self.db = mysql(
                host='49.233.176.208',
                user='root',
                password='PLMqaz123.',
                database='roncoo_mini_pay_demo',
                port=3306
        )

